Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import Date fields #45

Open
CodeMasterZeroOne opened this issue Jul 31, 2020 · 2 comments
Open

import Date fields #45

CodeMasterZeroOne opened this issue Jul 31, 2020 · 2 comments

Comments

@CodeMasterZeroOne
Copy link

Hello, and thank you for this app, helped me a lot! I am new to firestore and I was able to import my data from xlsx but date fields '2020-01-01' are written to firestore as strings how can I change that to write those as timestamp?
Thanks in advance

@AkshayToraskar
Copy link

any progress? to decode string in timestamp

@AkshayToraskar
Copy link

AkshayToraskar commented Jan 19, 2022

create JSON file with appropriate type, file format as below

{
	"collection:cust": [
		{
			"age": "1/1/2022",
                        "createdAt": "{\"type\":\"timestamp\",\"data\":1641141025}",
			"mobile2": "",
			"name": "test1",
			"locality": "Mumbai",
			"updatedAt": "{\"type\":\"timestamp\",\"data\":1641141025}",
			"mobile": "98989898"
		},
		{
			"locality": "bbbb",
			"updatedAt": "{\"type\":\"timestamp\",\"data\":1641141025}",
			"mobile": "1234567",
			"name": "bbb",
			"mobile2": "",
			"age": "12/1/2022",
			"createdAt": "{\"type\":\"timestamp\",\"data\":1641141025}"
		}
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants